using System.Collections.Generic;
using Voodoo.Meta.RVModules;
using Voodoo.Pattern;

public class ChestRoomRewardsController : SingletonMB<ChestRoomRewardsController>
{
	public List<RewardInfo> DefaultRewardsItems = new List<RewardInfo>();

	public List<RewardInfo> LengthRewardItems = new List<RewardInfo>();

	public List<RewardInfo> GasRewardsItems = new List<RewardInfo>();

	public List<RewardInfo> SizeRewardsItems = new List<RewardInfo>();

	public List<RewardInfo> PowerRewardsItems = new List<RewardInfo>();

	public List<RewardInfo> GetRewards()
	{
		List<RewardInfo> list = new List<RewardInfo>();
		if (SingletonMB<Shop>.Instance.MaxLengthLevel > NintendoPlayerPrefs.GetInt("Long", 0))
		{
			list.AddRange(LengthRewardItems);
		}
		if (SingletonMB<Shop>.Instance.MaxOilLevel > NintendoPlayerPrefs.GetInt("Oil", 0))
		{
			list.AddRange(GasRewardsItems);
		}
		if (SingletonMB<Shop>.Instance.MaxPowerLevel > NintendoPlayerPrefs.GetInt("Power", 0))
		{
			list.AddRange(PowerRewardsItems);
		}
		if (SingletonMB<Shop>.Instance.MaxSizeLevel > NintendoPlayerPrefs.GetInt("Size", 0))
		{
			list.AddRange(SizeRewardsItems);
		}
		list.AddRange(DefaultRewardsItems);
		while (list.Count < 9)
		{
			list.AddRange(DefaultRewardsItems);
		}
		return list.GetRandomRange(8);
	}
}
